package com.hongdee.insurance.order.service;

import com.hongdee.insurance.car.entity.TInsuranceCar;
import com.hongdee.insurance.order.entity.TInsuranceOrder;

import java.util.Map;

/**
 * Created by Mr. Xu on 2017/4/27.
 */
public interface ITInsuranceOrderService
{
    /**
     * 保险出单保存
     * @param data
     * @param uid
     * @throws Exception
     */
    public void save(TInsuranceOrder data, String uid) throws Exception;

    /**
     * 保险客户求助信息出单
     * @param data
     * @param uid
     * @param helpId
     * @throws Exception
     */
    public void saveSeekHelpOrder(TInsuranceOrder data, String uid,String helpId) throws Exception;
    /**
     * 保险单分页查询
     *
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public Map page(String uid, String start, String limit, Map data,boolean page) throws Exception;
    /**
     * 已有保险单
     * @param uid
     * @param carId
     * @param start
     * @param limit
     * @return
     * @throws Exception
     */
    public Map hasOrder(String uid, String carId, String start, String limit) throws Exception;
    /**
     * 保险单退回
     * @param uid
     * @param id
     * @throws Exception
     */
    public void returnOrder(String uid, String id) throws Exception;

    /**
     * 保险单退单
     * @param uid
     * @param data
     * @throws Exception
     */
    public void insuranceReturnOrder(String uid,Map<String,Object> data) throws Exception;

    /**
     * 获得保险单详情
     * @param qId
     * @param carId
     * @return
     */
    public Map info(String uid,String qId,String carId) throws Exception;

    /**
     * 获得保险单详情
     * @param id
     * @return
     * @throws Exception
     */
    public TInsuranceOrder getInfo(String id)throws Exception;

    /**
     * 返现确认
     * @param id
     * @param uid
     * @param time
     * @return
     * @throws Exception
     */
    public TInsuranceOrder confimBack(String id,String uid,String time,String backPrice) throws Exception;

    /**
     * 退保确认
     * @param id
     * @param uid
     * @return
     * @throws Exception
     */
    public TInsuranceCar returnInsurance(String id, String uid) throws Exception;

    /**
     * 保险单管理，新增保险单
     * @param data
     * @param uid
     * @throws Exception
     */
    public void addInsuranceOrder(Map data,String uid)throws Exception;

    /**
     * 追加保险单
     * @param data
     * @param uid
     * @throws Exception
     */
    public void insuranceOrderAppend(Map data, String uid) throws Exception;

    /**
     * 获取保单
     * 结算对账单明细查询，增加保单
     * 根据对账单所属于的保险公司信息、4s店信息、保单号、车牌号、保费、保险类别（商业or交强）查询保单
     * 同时已结算的保单不在查询之列
     * @param data
     * @param uid
     * @param billId
     * @return
     */
    public Map<String,Object> getBlanceInsuanceOrderList(Map data,String uid,String billId,String start,String limit) throws Exception;


    /**
     * 更新保单信息
     * 目前支持 保险项目、合同号、返现金额
     * @param data
     * @param uid
     * @throws Exception
     */
    public void update(Map data,String uid) throws Exception;

    /**
     * 根据保险单ID 获得相应信息用于编辑
     * @param orderId
     * @param uid
     * @return
     * @throws Exception
     */
    public Map getInsuranceOrderToUpd(String orderId,String uid) throws Exception;

    /**
     * 保单汇总统计
     * @param data
     * @param uid
     * @return
     * @throws Exception
     */
    public Map orderPageStatistics(Map data,String uid) throws Exception;

    /**
     * 提交审核
     * @param uid
     * @param orderId
     * @throws Exception
     */
    public void subInsuranceOrder(String uid,String orderId) throws Exception;
}

